/**   
 * @Title: UpdateShiroPermi.java
 * @Package com.nbst.comnutil
 * @Description:
 * @author King  
 * @date 2018-9-6  
 */

package com.nbst.comnutil;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.RealmSecurityManager;

import com.nbst.shiro.MyRealm;

/**
 * @ClassName: UpdateShiroPermi
 * @Description:
 * @author King
 * @date 2018-9-6
 * 
 */

public class UpdateShiroPermi {
	/**
	 * 
	 * 清空shiro权限缓存
	 * void 
	 * @author King
	 * @date 2018-9-6
	 */
	public static void cleanShiro() {
		RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils
				.getSecurityManager();
		MyRealm authRealm = (MyRealm) rsm.getRealms().iterator().next();
		authRealm.clearAuthz();
	}

}
